<template>
  <view class="content">
    <card></card>
    <!-- 		<view class="">
      <view class="oneKeyOpenClass" @click="openingBox">
        <image src="../../static/翻牌.png" mode=""></image>
      </view>
      <view class="oneKeyOpenClass" @click="reset">
        <image src="../../static/重置.png" mode=""></image>
      </view>
    </view> -->

  </view>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      openIndex: 0,
      p: ['张山', '李四', '万一', '王伟', '夏红'],
      work: ['打包', '发货', '客户', '进货', '会计']
    }
  },
  mounted() {
  },
  methods: {
    getList() {
      if (Number(getApp().globalData.num) === this.openIndex + 1) {
        return [{
          isStartChangeCard: false,
          level: 1,
          wardImg: `指定1`
        },
          {
            isStartChangeCard: false,
            level: 1,
            wardImg: `指定2`
          },
          {
            isStartChangeCard: false,
            level: 1,
            wardImg: `指定3`
          }, {
            isStartChangeCard: false,
            level: 1,
            wardImg: `指定4`
          }, {
            isStartChangeCard: false,
            level: 1,
            wardImg: `指定5`
          }

        ]
      }

      let old_arr = this.work
      let newArr = [].concat(old_arr)
      let valArr = []
      this.p.forEach((item, index) => {
        let r = Math.floor(Math.random() * (newArr.length))
        valArr.push({
          isStartChangeCard: false,
          level: 1,
          wardImg: `${item}-${newArr[r]}-${this.openIndex + 1}`
        })
        newArr.splice(r, 1)
      })
      return valArr
    },
  }
}
</script>

<style lang="scss" scoped>
.content {
  height: 100vh;
  width: 100vw;
  // display: flex;
  // flex-direction: column;
  // align-items: center;
  // justify-content: center;
  background-image: url("../../static/bg.jpg");
  background-size: cover;

  .oneKeyOpenClass {
    width: 10px;
    height: 10px;
  }
}
</style>
